package com.shell.arouter.demo.room

import androidx.room.*

///**
// * 说明：User
// * <p/>
// * 作者：fanly
// * <p/>
// * 类型：Class
// * <p/>
// * 时间：2019-12-21 12:59
// * <p/>
// * 版本：version 1.0
// */
//@Entity(tableName = "t_user")
//data class RoomUser(@PrimaryKey(autoGenerate = true) val uid: Int,
//                    @ColumnInfo(name = "first_name") val firstName: String,
//                    @ColumnInfo(name = "last_name") val lastName: String)
//
//@Dao
//interface UserDao {
//
//    @Query("SELECT * FROM 't_user'")
//    suspend fun getAllUser(): List<RoomUser>
//
//    @Query("select * from 't_user' where uid in (:userIds)")
//    suspend fun loadAllByIds(userIds: IntArray): List<RoomUser>
//
//    @Query("select * from 't_user' where first_name == :first and last_name == :last")
//    suspend fun findByName(first: String, last: String): RoomUser
//
//    @Insert
//    suspend fun insertRoomUser(vararg users: RoomUser)
//
//    @Delete
//    suspend fun delete(user: RoomUser)
//
//}
//
//@Database(entities = arrayOf(RoomUser::class), version = 1)
//abstract class AppDatabase : RoomDatabase() {
//    abstract fun userDao(): UserDao
//}